import Home from '@/views/Home'
import Tabbar from '@/components/Tabbar'
// 分包
const Msg = () => import('@/views/Msg')
const Lesson = () => import('@/views/Lesson')
const Mine = () => import('@/views/Mine')
const routes = [
  // 重定向
  {
    path: '/',
    redirect: '/home',
    meta: {
      title: '首页',
      isTabbar: false
    }
  },
  {
    path: '/home',
    name: 'Home',
    components: {
      default: Home,
      'mc-footer': Tabbar
    },
    meta: {
      icon: 'wap-home-o',
      title: '首页',
      isTabbar: true
    }
  },
  {
    path: '/msg',
    name: 'Msg',
    components: {
      default: Msg,
      'mc-footer': Tabbar
    },
    meta: {
      icon: 'smile-comment-o',
      title: '消息',
      isTabbar: true
    }
  },
  {
    path: '/lesson',
    name: 'Lesson',
    components: {
      default: Lesson,
      'mc-footer': Tabbar
    },
    meta: {
      icon: 'orders-o',
      title: '课程',
      isTabbar: true
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    components: {
      default: Mine,
      'mc-footer': Tabbar
    },
    meta: {
      icon: 'friends-o',
      title: '我的',
      isTabbar: true
    }
  }
]
export default routes
